<template>
				<div class="mui-numbox" data-numbox-min='1' :data-numbox-max='10'>
					<button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
					<input id="test" class="mui-input-numbox" type="number" value="1"  
                    @change="countChanged" ref="numbers" />
                    <!-- 加入父组件传递出来了参数 -->

					<!-- <input id="test" class="mui-input-numbox" type="number" :value="id"  
                    @change="countChanged" ref="numbers" /> -->

					<button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
				</div>
</template>
<script>
import mui from '../../js/mui.min.js'
export default {
    data() {
        return {
           
        }
    },
    mounted() {
        mui('.mui-numbox').numbox()
       
    },
    methods: {
        countChanged() {
            
            // 如果里面的值发生了变化就向vuex里面传递请求
            this.$store.commit('',{
                id: id2,
                count: this.$refs.value
            })
        }
    },
    props: ['id','id2']  // 这里id 是父组件传递的localStorage里面的数量  ,id2 是父组件传递的 对应数量的id

}
</script>
<style lang="scss" scoped>
    
</style>
